<!DOCTYPE html>
<script src="../resources/text-based-repaint.js"></script>
<script>
function repaintTest() {
  document.getElementById('fixed').style.display = 'none';
}
onload = function() {
  // Scroll before repaint test to test correct scroll offset of invalidation rect
  // for fixed-position element when it needs repaint.
  window.scrollTo(0, 400);
  runRepaintAndPixelTest();
};
</script>
<style>
body {
  height: 2000px;
}
#fixed-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: green;
  backface-visibility: hidden;
}
#fixed {
  position: fixed;
  top: 100px;
  left: 100px;
  width: 200px;
  height: 200px;
  background-color: red;
}
</style>
Tests paint invalidation of fixed elements under a composited fixed element after scrolled.
Passes if there is only green background.
<div id="fixed-container">
  <div id="fixed"></div>
</div>
